package org.scau.studentevaluation.entity.query;

import org.scau.studentevaluation.consts.StudentConst;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @ClassName: StudentQuery
 * @Description: TODO
 * @Author: sunslikes
 * @Date: 2020/8/29 16:54
 * @Version: 1.0
 */
public class StudentQuery {

    @NotBlank
    String name;
    /**
     * 学号
     */
    @NotBlank
    @Pattern(regexp = StudentConst.STUDENT_ID_PATTERN, message = "学号错误")
    String studentId;
    /**
     * 学生所属学院
     */
    @NotBlank
    String college;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getStudentId() {
        return studentId;
    }

    public void setStudentId(String studentId) {
        this.studentId = studentId;
    }

    public String getCollege() {
        return college;
    }

    public void setCollege(String college) {
        this.college = college;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", studentId='" + studentId + '\'' +
                ", college='" + college + '\'' +
                '}';
    }
}
